const { defineConfig } = require('@vue/cli-service')
const path = require('path')
module.exports = defineConfig({
  transpileDependencies: true,
  lintOnSave: true,
  // # 这个是给webpack - dev - server开启可IP和域名访问权限
  devServer: { historyApiFallback: true, allowedHosts: 'all' },
  pluginOptions: {
    'style-resources-loader': {
      preProcessor: 'less',
      patterns: [
        path.join(__dirname, './src/style/variables.less')
      ]
    }
  },
  // # 这个是设置外部扩展，模块为qc变量名为QC，导入qc将不做打包
  configureWebpack: {
    externals: {
      // 用来去除打包时候的常用不变模块
      qc: 'QC'
    }
  }
})
